#ifndef __SUBSYSTEM_BULLET_BLOCK_BEHAVIOR_H__
#define __SUBSYSTEM_BULLET_BLOCK_BEHAVIOR_H__

#include <set>
#include <mutex>
#include "Engine/Point3.hpp"
#include "Subsystems/BlockBehaviors/SubsystemBlockBehavior.hpp"

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    class SubsystemTerrain;
    class SubsystemExplosions;

    // 子弹行为，子弹打击到后会引发一点小爆炸，这个是用于引爆炸药桶的
    class SubsystemBulletBlockBehavior : public SubsystemBlockBehavior
    {
    protected:
        SubsystemTerrain *m_terrain;
        SubsystemExplosions *m_explosions;

    public:

        virtual bool onHitAsProjectile(std::shared_ptr<CellFace> cellFace, ComponentBody *componentBody, WorldItem *worldItem) override;
        virtual void load(const nlohmann::json& json) override;

        virtual const std::string& getName() const override;
    };
    
}

#endif
